Labels
may be freestanding or attached to an object. The label template defines
what fields from the database table are displayed in the label.
Links provide a powerful mechanism for associating
external data with program graphical objects. By selecting linked
objects, you can readily access their associated records in the
database table. Links do, however, have some inherent limitations.
Suppose, for example, that you wanted to print a drawing and include
the external data associated with individual links. Because the
links are merely pointers to the external database table, the external
data would not appear in your printed drawing. For those occasions
when you want a visible representation of external data in a drawing,
the program provides labels.
Labels are multiline text objects that display
data in a drawing from selected fields stored in an external database
table.
The labels that you create in the program can
be freestanding, or they can be attached to a graphical object.
Freestanding labels exist in the drawing independent of any graphical
objects. Labels that are attached to a graphical object are tightly
connected with it. If you move the graphical object, the label moves
with it. If you copy the object to the Clipboard, the label is also copied.
If you delete an object that has an attached label, the label is
deleted as well. Labels associated with graphical objects are displayed
with a leader.
To work with labels, you must first create a
label template that defines what fields from the database table
are displayed in the label and how the label text is formatted.
Edit Label Templates
After
defining a label template, you might have cause to edit it. For
example, you may decide that you want additional database table
fields to be displayed in your drawings, or that you want to change
the font or size of the label object. You can also specify a number
of offset settings that affect the insertion point of labels and,
in the case of attached labels, their associated leader objects.
The
Label Offset tab of the Label Template dialog box specifies X and Y coordinate
offset values for labels and leader objects. The following table
summarizes the effect these settings have on both freestanding and
attached labels.
Label
Offset tab options
|
Option
|
Freestanding labels
|
Attached labels
|
Start
|
N/A
|
Specifies the start point for the leader object.
The point is defined with respect to the extents of the graphical
object that the label is attached to. Suppose, for example, that
you specify a Start setting of Top Left for a label attached to
a rectangle graphical object. The tip of the leader is inserted
in the upper left corner of the rectangle.
|
Leader Offset
|
N/A
|
Specifies an X and Y offset
for the multiline text object with respect to the associated leader
object. By default, the X and Y Leader Offset
options are set to 1, indicating that the label text is offset 1
unit in the X and Y planes from
the tip of the leader object.
|
Tip Offset
|
Specifies an X and Y label
offset
from the insertion point
you specify for the label. For example, X and
Y Tip Offset settings of -1 cause
the label to be inserted offset 1 negative unit in the X and Y planes
from the insertion point you specify in the drawing.
|
Specifies an X and Y offset
for the tip of the leader object from the value specified with the
Start option. Suppose, for example, that you specify a Start setting
of Top Left for a label attached to a rectangle graphical object.
You also specify X and Y Tip Offset
values of 1. The tip of the leader is inserted offset 1 positive
unit in the X and Y planes from
the upper left corner of the rectangle.
|
Edit Labels
Once
you have created labels, you can edit and manipulate them in a variety of
ways. Labels and their leaders can be moved and resized using standard commands
such as COPY, MOVE, and SCALE. It is important
to note that changes made to individual label instances do not affect
or redefine the label template.
NoteIt is not recommended
that you edit the text of labels using the In-place Text Editor.
The new text values are not updated in the link or the database table,
and original field values are restored if you click Reload. If you
want to change field values for an existing label, edit the link
values as described in
Create and Edit Links and Link Templates and
click Reload.
To create a label template
- In the dbConnect Manager, click the New
Label Template button.
- In the New Label Template dialog box,
enter a name for the label template in New Label Template Name.
- To open the Label Template dialog box,
click Continue.
- In the Label Template dialog box, Label
Fields tab, select a field to appear in the label from the Field
list. Click Add to add it to the label.
You can also enter any additional static text
that you want to precede or follow the label directly in the Label
Template dialog box. For example, you might create a label template
that uses the field Room Number from a room database table. If you
want the field name to precede the field value when the label is
created, enter Room Number: in the Label Template
dialog box before selecting the field from the Field list.
- Repeat step 5 for any additional fields
that you want displayed in your label.
- Click OK.
To create a link with a
freestanding label
- In the dbConnect Manager, open a database
table that has at least one link template and one label template
defined.
- In the Data View window, select a link
template from the Link Template list.
- In the Data View window, select a label
template from the Label Template list.
- In the Data View window, select the record
that you want to link.
- Right-click the record header (the empty
square to the left of the row) of the selected record. Click Link
And Label Settings
Create
Freestanding Labels.
- Click Data View menu
Link.
- Select an area in the drawing to insert
the label.
To create a link to an
object with an attached label
- In the dbConnect Manager, open a database
table that has at least one link template and one label template
defined.
- In the Data View window, select a link
template from the Link Template list.
- In the Data View window, select a label
template from the Label Template list.
- Select the record that you want to link
from the Data View window.
- Click Data View menu
Link
And Label Settings
Create
Attached Labels.
- Click Data View menu
Link.
- Select an object or objects in the drawing
that you want the label associated with.
- Press Enter.
To edit a label template
- In the dbConnect Manager, in the tree
view, right-click a label template to edit. Click Edit.
- In the Label Template dialog box, make
the changes you want as described in
To create a label template.
- Click OK.
To specify label formatting
- Create a new label template as described
in
To create a label template.
- In the Label Template dialog box, select
text formatting options using the Character and Properties tabs,
as described in MTEXT in the Command
Reference.
- In the Label Offset tab, specify the
insertion point for the tip of the leader object in Start.
The Start setting has no effect on freestanding
labels.
- Enter both X and Y offset
values in Leader Offset to specify the offset of the label from
the tip of the leader object.
By default, the X and Y offset
values are set to 1, indicating that the label is offset by one
drawing unit in both the X and the Y directions
from the tip of the leader object.
- Enter both X and Y offset
values in Tip Offset to specify the offset for the leader object
or, for freestanding labels, the offset of the label from the insertion
point you specify for the label.
CommandsDBCONNECT
Provides an interface
to external database tables.